<!--#include file="../inc/const.asp"-->
<!--#include file="Order_Class.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>留言版</title>
<style type="text/css">
body{font-size:14px}
</style>
</head>

<body>
<%
Dim Rs,i,style,ID,Sql
ID = Request("ID")
If len(ID)=0 Or Not isNumeric(ID) Then
	Sql = "[State]=0"
Else
	Sql = "[ID] = "&ID
End If
 
Set Rs = New DataList
Rs.Field = "[ID],[Content],[Time],[Ip]"
Rs.Table = "[{pre}Comment]"
Rs.Where = Sql
'Rs.Order = "[" & DFieldOrders & "] " & Orders & ""
Rs.AbsolutePage = 0
Rs.List()
%>
<table border="0" style="margin:10px 0" width="100%">
<%
If Rs.Eof Then
%>
<tr>
		<td style="line-height:25px; padding:5px;">没有新留言</td>
	</tr>
<%Else
For i=0 to Ubound(Rs.Data,2)
if i mod 2 = 0 then
style = " style='background:#CCCCCC; padding:5px'"
else
style = " style='padding:5px'"
end if

dim act
act = request("act")
if act = "view" then
DB "update [{pre}Comment] set [State]=1 where [ID]="&ID,1 
%>
	<tr>
		<td style="line-height:25px; padding:5px;">内容：<%=Rs.Data(1,i)%>  <br />IP：<%=Rs.Data(3,i)%><br />时间：<%=Rs.Data(2,i)%><br />[<a href="book.asp">返回</a>]</td>
	</tr>
<%else%>
<tr>
		<td<%=style%>><%=Rs.Data(1,i)%>  [<a href="?act=view&id=<%=Rs.Data(0,i)%>">查看详细</a>]</td>
	</tr>
<%
end if
Next
End If
%>
</table>
<div style="border-top:1px solid #CCCCCC; line-height:25px; height:25px; color:#666666">Powered by 5u.hk! v3</div>
</body>
</html>
